//
//  YbrMusicItem.h
//  wifibox
//
//  Created by os X 10.9 on 14-12-5.
//  Copyright (c) 2014年 yinbaner. All rights reserved.
//  音乐类的全部

#import <Foundation/Foundation.h>
#import "YbrClassInfoItem.h"
//#import "YbrTextClassMusicItem.h"

@interface YbrMusicItem : NSObject

@property(nonatomic,assign)int _id;
@property (nonatomic) int musicId;
@property (nonatomic, strong) NSString *musicName;
@property (nonatomic, strong) NSString *singername;
@property (nonatomic, assign) int albumId;
@property (nonatomic, strong) NSString *albumname;
@property (nonatomic, strong) NSString *downloadurl;
@property (nonatomic, strong) NSString *file;
@property (nonatomic, strong) NSString *img;
@property (nonatomic) int duration;
@property (nonatomic) int type; // 音频的类型
@property (nonatomic, strong) NSString *timeStr;
@property(nonatomic,copy)NSString *timeLength;
@property(nonatomic,copy)NSString *lastPlayTime;

@property(nonatomic,copy)NSString *pinyin;

@property(nonatomic,assign)int isSel;

// 将ClassInfo 对象转换为MusicItem对象
+(YbrMusicItem *) classInfoToMusicItem :(YbrClassInfoItem *) classInfo albumname:(NSString *) albumname img:(NSString *) img type:(int) type albumId:(int) albumId;

+(YbrMusicItem *) classInfoToMusicItem :(YbrClassInfoItem *) classInfo albumname:(NSString *) albumname singername:(NSString *)singername img:(NSString *) img type:(int) type albumId:(int) albumId;

//+(YbrMusicItem *) textClassMusicToMusicItem :(YbrTextClassMusicItem *) textClassMusicInfo albumname:(NSString *) albumname singername:(NSString *)singername img:(NSString *) img type:(int) type albumId:(int) albumId;

+(NSArray *) classInfosToMusicItems:(NSArray *) classInfos albumname:(NSString *) albumname singername:(NSString *)singername img:(NSString *) img type:(int) type albumId:(int) albumId;

+(NSArray *) textClassInfoToMusicItem:(NSArray *) textClassInfos albumname:(NSString *) albumname singername:(NSString *)singername img:(NSString *) img type:(int) type albumId:(int) albumId;

+(NSArray *) classInfosToMusicItems:(NSArray *) classInfos albumname:(NSString *) albumname img:(NSString *) img type:(int) type albumId:(int) albumId;

// 将音乐墙转换为播放列表
+(NSArray *) musicHallsToMusicItems:(NSArray *) musicInfos albumname:(NSString *) albumname type:(int) type albumId:(int) albumId;

+(NSArray *)downMusicInfoChangeMusicArr:(NSArray *)musicArr FileType:(int)FileType;

@end
